package kr.co.graviti.service.login;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
@SuppressWarnings("unchecked")
public class LoginServiceImp implements LoginService{

	@Autowired
	private SqlMapClientTemplate sqlMapClientTemplate;
	
	@Override
	public HashMap<String, Object> selectAdminCount(HashMap<String, String> param) {
		return (HashMap<String, Object>)sqlMapClientTemplate.queryForObject("Login.selectAdminCount", param);
	}

	@Override
	public List<HashMap<String, Object>> selectTopMenuAuthority(
			HashMap<String, Object> param) {
		return (List<HashMap<String,Object>>)sqlMapClientTemplate.queryForList("Login.selectTopMenuAuthority", param);
	}

	@Override
	public List<HashMap<String, Object>> selectLeftMenuAuthority(
			HashMap<String, Object> param) {
		return (List<HashMap<String, Object>>)sqlMapClientTemplate.queryForList("Login.selectLeftMenuAuthority", param);
	}

}
